package cn.jiyun.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.jiyun.pojo.Role;
import cn.jiyun.service.RoleService;
import cn.jiyun.mapper.RoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【role】的数据库操作Service实现
* @createDate 2024-10-29 14:57:51
*/
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role>
    implements RoleService{

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public Page<Role> findPage(Integer pageNum, Integer pageSize, Role role) {
        Page<Role> page=new Page(pageNum,pageSize);
        List<Role> list = roleMapper.findPage(page,role);
        page.setRecords(list);
        return page;
    }

    @Override
    public Role chakan(Integer id) {
       Role role =  roleMapper.chakan(id);
        return role;
    }


}




